package com.yzh.oop8;


/**
 * @author 于振晗
 * @title: BookNameComparator
 * @description: TODO 书名外部比较器
 * @date 2020年08月28日
 * @path com.yzh.oop8
 */
public class BookNameComparator implements Comparator {
    @Override
    public int compare(Object obj1, Object obj2) {
        Book book1 = (Book)obj1;
        Book book2 = (Book)obj2;
        return book1.getBookName().compareTo(book2.getBookName());
    }
}
